package com.springmvc.study.controller;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

// 只要事先Controller接口得类 说明就是一个控制器了
@Component
//@Service
//@Repository
public class ControllerTest1 implements Controller  {


    public ModelAndView handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
        ModelAndView mv = new ModelAndView();

        mv.addObject("msg", "ControllerTest1");
        mv.setViewName("test");

        return null;
    }
}
